# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-cowpy
_pkgname=cowpy
pkgver=1.1.5
_pyver=3.13
pkgrel=4
pkgdesc='A cowsay clone for python in one file.'
arch=('any')
url='https://pypi.org/project/cowpy/#files'
license=('custom:unknown')
makedepends=('python-pip' 'python-build' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('83d0bba312624642d5e7e6a49a532197e6f76d17361ded76267577dfbf86e5e68b17f4fc95f965c1c5f8029bcfb2ea47e6456dec739b5c71411f81704f245427')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}
